package com.ruoyi.web.controller.banner.api;


import com.ruoyi.category.service.IWebCarouselService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * aaaController
 *
 * @author ruoyi
 * @date 2024-08-03
 */
@RestController
@RequestMapping("/api/web/carousel")
@Api(tags = "前台:banner")
public class ApiWebCarouselController extends BaseController {
    @Autowired
    private IWebCarouselService webCarouselService;

    /**
     * 查询banner详细信息
     */
    @ApiOperation(value = "根据name查询banner")
    @GetMapping(value = "/{name}")
    public AjaxResult getInfo(@PathVariable("name") String name) {
        return success(webCarouselService.selectWebCarouselByName(name));
    }
}

